<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>寄件</title>
<%@ include file="/pages/wx/baseHead.jsp"%>
<script type="text/javascript" src="${urlBasePath}js/express/expressSend.js?v=<%=v %>"></script>
<script type="text/javascript" src="${urlBasePath}js/jquery.cookie.js?v=<%=v %>"></script>

</head>
<body style="background-color:rgb(239,239,244);">

<form action="${urlBasePath }weixin/user/expressCreate.do" name="theform" id="theform" method="POST">
	<input type="hidden" name="vv" id="token">
	<div class="weui_cells">
	   <div class="weui_cell" style="padding: 1px 15px;">
	   	   <div class="weui_cell_hd"><img src="${urlBasePath}images/send.png"></div>
	       <div class="weui_cell_bd weui_cell_primary">
		           <a href="javascript:void(0);" onclick="openSheet('jjdz');">
		           		<p style="padding: 15px 0px 0px 5px;" id="adrjjdz">请选择寄件人地址</p>
		           		<input type="hidden" name="fromId" id="ipt_adrIdjjdz">
		           </a>
	       </div>
	       <div class="weui_cell_ft">
	           <i class="fa fa-angle-right fa-sm"></i>
	       </div>
	   </div>
	   <div class="weui_cell"  style="padding: 1px 15px;">
	   	   <div class="weui_cell_hd"><img src="${urlBasePath}images/receive.png"></div>
	       <div class="weui_cell_bd weui_cell_primary">
		           <a href="javascript:void(0);" onclick="openSheet('sjdz');">
		           		<p style="padding: 15px 0px 0px 5px;" id="adrsjdz">请选择收件人地址</p>
		           		<input type="hidden" name="direId" id="ipt_adrIdsjdz">
		           </a>
	       </div>
	       <div class="weui_cell_ft">
	           <i class="fa fa-angle-right fa-sm"></i>
	       </div>
	   </div>
	</div>
	
	
	<div class="weui_cells">
	   <div class="weui_cell">
	       <div class="weui_cell_bd weui_cell_primary">
	       		<a href="javascript:void(0);" onclick="openSheet('jjd');">
		           <p style="padding: 15px 0px 0px 5px;" id="jjd_p">请选择寄件点</p>
		           		<input type="hidden" name="jjd" id="ipt_jjd">
		           		<input type="hidden" name="mercNo" id="ipt_merNo">
		        </a>   		
	       </div>
	       <div class="weui_cell_ft">
	           <i class="fa fa-angle-right fa-sm"></i>
	       </div>
	   </div>
	   
	   <div class="weui_cell">
	       <div class="weui_cell_bd weui_cell_primary">
	       		<a href="javascript:void(0);" onclick="openSheet('kdgs');">
		           <p style="padding: 15px 0px 0px 5px;" id="expMerc_p">请选择快递公司</p>
		           <input type="hidden" name="expMercNo" id="ipt_expMercNo">
		        </a>   
	       </div>
	       <div class="weui_cell_ft">
	           <i class="fa fa-angle-right fa-sm"></i>
	       </div>
	   </div>
	   
	   <div class="weui_cell weui_cell_switch" id="publicFlagDiv" style="display: none;">
	        <div style="padding: 0px 0px 0px 5px;" class="weui_cell_hd weui_cell_primary" >是否对公快递</div>
	        <div class="weui_cell_ft">
	            <input class="weui_switch" type="checkbox" name="publicFlag" id="publicFlag" disabled="disabled"/>
	    	</div>
		</div>
		
		<div class="weui_cell" style="float: left;width: 50%;">
		       <div class="weui_cell_bd weui_cell_primary" >
			       	<a href="javascript:void(0);" onclick="openSheet('wp');">
				           <p style="padding: 5px 0px 0px 5px;" id='wp_p'>
				           	物品 <br><font size='2px'> 请选择 &nbsp; 0.00 kg</font>
				           </p>
				           <input type="hidden" name="wp" id="ipt_wp">
				           <input type="hidden" name="weight" id="ipt_weight">
				    </a>       
		       </div>
		       <div class="weui_cell_ft">
		           <i class="fa fa-angle-right fa-sm"></i>
		       </div>
		</div>
		<div class="weui_cell" style="float: right;width: 50%;border-left:1px solid #D9D9D9">
		       <div class="weui_cell_bd weui_cell_primary">
			       	<a href="javascript:void(0);" onclick="openEnsurePrice();">
				           <p style="padding: 5px 0px 0px 5px;" id="ensurePriceFont">
				           	保价 <br><font size='2px'>0.00 元</font>
				           </p>
				            <input type="hidden" name="ensurePrice" id="ipt_ensurePrice">
				    </a>       
		       </div>
		       <div class="weui_cell_ft">
		           <i class="fa fa-angle-right fa-sm"></i>
		       </div>
		 </div>
	</div>

</form>
<!-- actionsheet寄件点 -->
<div class="weui_mask_transition" id="mask"></div>
<div class="weui_actionsheet" id="weui_actionsheet_jjd">
    <div class="weui_actionsheet_menu">
    	<c:forEach var="oper" items="${opers }">
	        <div class="weui_actionsheet_cell" id="jjd${oper.opId }" 
	        	data-mercno="${oper.mercNo }"
	        	data-pubflag="${oper.pubFlag}"
	        	data-mercname="${oper.mercName }"
	        	data-address="${oper.opAddress }"
	        	onclick="setJjd('${oper.opId }');">${oper.opAddress }</div>
    	</c:forEach>
    </div>
    <div class="weui_actionsheet_action" id="nearByDiv">
    	<!-- <div class="weui_actionsheet_cell" style="color: gray;">↓附近运营点↓</div> -->
    </div>
    <div class="weui_actionsheet_action">
        <div class="weui_actionsheet_cell" id="actionsheet_cancel_jjd">取消</div>
    </div>
</div>
<!-- actionsheet -->



<!-- actionsheet快递公司 -->
<div class="weui_mask_transition" id="mask"></div>
<div class="weui_actionsheet" id="weui_actionsheet_kdgs">
    <div class="weui_actionsheet_menu" id="expTypeDiv">
    </div>
    <div class="weui_actionsheet_action">
        <div class="weui_actionsheet_cell" id="actionsheet_cancel_kdgs">取消</div>
    </div>
</div>
<!-- actionsheet -->

<!-- actionsheet 选择物品-->
    <div class="weui_actionsheet" id="weui_actionsheet_wp">
        <div class="weui_actionsheet_menu">
            <div class="weui_actionsheet_cell" onclick="setWp('文件');" >文件</div>
            <div class="weui_actionsheet_cell" onclick="setWp('数码产品');" >数码产品</div>
            <div class="weui_actionsheet_cell" onclick="setWp('生活用品');" >生活用品</div>
            <div class="weui_actionsheet_cell" onclick="setWp('服饰');" >服饰</div>
            <div class="weui_actionsheet_cell" onclick="setWp('食品');" >食品</div>
            <div class="weui_actionsheet_cell" onclick="show('.wpselfDiv');">其他</div>
        </div>
        <div class="weui_actionsheet_action">
            <div class="weui_actionsheet_cell" id="actionsheet_cancel_wp">取消</div>
        </div>
    </div>
<!-- actionsheet -->


<!-- actionsheet寄件地址 -->
<div class="weui_actionsheet" id="weui_actionsheet_jjdz" style="max-height: 90%;overflow: auto;">
    <div class="weui_actionsheet_menu">
    	<div class="weui_actionsheet_action" onclick="to('${urlBasePath}weixin/user/addView.do?rs=jjdz');">
        	<div class="weui_actionsheet_cell" id="actionsheet_cancel_dz">添加新地址(寄件)</div>
    	</div>
    	<c:forEach var="adr" items="${addrs}">
	        <div class="weui_actionsheet_cell" id="dz${adr.sn}" 
	        	data-name="${adr.receiveName }" 
	        	data-phone="${adr.receiveCellPhone }"
	        	data-adr="${adr.addressDetail }"
	        	onclick="setDz('${adr.sn}','jjdz');">
	        	<div class="weui_media_box weui_media_appmsg form-inline itemClass"  style="padding:10px 0px 0px 10px">
	                <div class="weui_media_bd" onclick="" align="left">
	                    <p class="weui_media_desc">
	                    	<i class="fa fa-phone fa-fw"></i>${adr.receiveName }
	                    	(<c:out value="${fn:substring(adr.receiveCellPhone,0,3)}****${fn:substring(adr.receiveCellPhone,7,11)}"></c:out>)
	                    </p>
	                    <p class="weui_media_desc">
	                    	<i class="fa fa-location-arrow fa-fw"></i>地址：${adr.addressDetail }
	                    </p>
	                </div>
			   </div>
	        </div>
	        <c:if test="${adr.isDefault == '00' }">
		        <script type="text/javascript">
		        	setDz('${adr.sn}','jjdz',true);
		        </script>
	        </c:if>
	        
        </c:forEach>
    </div>
    <div class="weui_actionsheet_action">
        <div class="weui_actionsheet_cell" id="actionsheet_cancel_jjdz">取消</div>
    </div>
</div>

<!-- actionsheet收件地址 -->
<div class="weui_actionsheet" id="weui_actionsheet_sjdz" style="max-height: 90%;overflow: auto;">
    <div class="weui_actionsheet_menu">
    	<div class="weui_actionsheet_action" onclick="to('${urlBasePath}weixin/user/addView.do?rs=sjdz');">
        	<div class="weui_actionsheet_cell" id="actionsheet_cancel_dz">添加新地址(收件)</div>
    	</div>
    	<c:forEach var="adr" items="${addrs}">
	        <div class="weui_actionsheet_cell" id="dz${adr.sn}" 
	        	data-name="${adr.receiveName }" 
	        	data-phone="${adr.receiveCellPhone }"
	        	data-adr="${adr.addressDetail }"
	        	onclick="setDz('${adr.sn}','sjdz');">
	        	<div class="weui_media_box weui_media_appmsg form-inline itemClass"  style="padding:10px 0px 0px 10px">
	                <div class="weui_media_bd" onclick="" align="left">
	                    <p class="weui_media_desc">
	                    	<i class="fa fa-phone fa-fw"></i>${adr.receiveName }
	                    	(<c:out value="${fn:substring(adr.receiveCellPhone,0,3)}****${fn:substring(adr.receiveCellPhone,7,11)}"></c:out>)
	                    </p>
	                    <p class="weui_media_desc">
	                    	<i class="fa fa-location-arrow fa-fw"></i>地址：${adr.addressDetail }
	                    </p>
	                </div>
			   </div>
	        </div>
        </c:forEach>
    </div>
    <div class="weui_actionsheet_action">
        <div class="weui_actionsheet_cell" id="actionsheet_cancel_sjdz">取消</div>
    </div>
</div>

<!-- actionsheet -->

<div class="weui_tabbar" style="position: fixed;bottom: 0%;left: 0%;">
    <div href="${urlBasePath}weixin/user/companySearch.do" class="weui_tabbar_item " style="background-color: rgb(223,240,216);">
        <p class="weui_tabbar_label">
        	<div style="padding-left: 1em;"><input type="checkbox" checked="checked" id="xycheckbox" style="margin-top: -1px;">我同意《<a href="javascript:void(0);" onclick="viewService();" style="color: blue;">
        	银盛递服务条款</a>》</div>
        </p>
    </div>
    <div onclick="checkOrder();" class="weui_bar_item_on" style="width: 30%;color: #09BB07;padding-top: 1.0em;">
        <p class="weui_tabbar_label" style="line-height: 40px;font-size:1.2em;color: #04BE02">
        <i class="fa fa-truck fa-sm"></i>&nbsp;提交</p>
    </div>
</div>
<div style="height: 60px;display: block;"></div>

<div class="weui_dialog_alert dialogService" style="display: none;">
	   <div class="weui_mask"></div>
	   <div class="weui_dialog">
	       <div class="weui_dialog_hd"><strong class="weui_dialog_title">银盛递服务条款</strong></div>
	       <div class="weui_dialog_bd " style="padding-top: -2em;">
	       	<!-- 服务条款内容 -->
	       		<article class="weui_article" style="height: 200px;overflow-x:auto;">
			            <section style="font-size: 0.7em;padding-top: -2em;text-align: left;">
							<p>1、特别声明：本平台只为快递公司、企业商户与寄件人提供快递电子订单服务的平台，不对快递物品配送过程中造成的快件损失、损坏负责。</p>
							<p>2、哪些物品不允许邮寄以用户选择的快递公司的规定为准，请用户遵守相关违禁品禁寄送的规定。</p>
							<p>3、建议寄件人邮寄价值超过2000元的贵重物品，请与快递员当面查验。</p>
							<p>4、为保证托寄物品安全送达，寄件人寄件时应当履行以下义务：</p>
								<section >
								 <p>（1）如实申报托寄物品内容和价值，并准确、清楚地填写寄件人、收件人的名称、地址、联系电话等资料；</p>
								 <p>（2）根据托寄物品的性质（尤其是易碎品），提供充分的防破损措施，保证托寄物品安全派送；</p>
								</section>
							<p>5、关于赔偿的规定：若寄送物品由于快递公司配送过程造成的损失，请联系对应快递公司进行索赔；若由企业商户/小区物业对待寄物品管理不到位造成的快件损失，请联系对应企业商户/小区物业索赔。</p>
							<p>6、本契约条款未做约定的，或本契约条款与国家相关法律法规及标准相冲突的，按照相关规定执行。</p>
			            </section>
			    </article>
	       </div>
	       <div class="weui_dialog_ft">
	           <a href="javascript:void(0);" onclick="closeService();" class="weui_btn_dialog primary" >关闭</a>
	       </div>
	   </div>
	</div>

<!-- 弹出保价Div -->
<div class="weui_dialog_confirm ensurePrice" style="display: none;">
	   <div class="weui_mask"></div>
	   <div class="weui_dialog">
	       <div class="weui_dialog_hd">
	       	<input class="weui_input" type="text"  style="height: 42px;
		       		border: 1px solid #04BE02;border-radius:5px;" id="ensurePrice" maxlength="10"
					pattern="[0-9]*" placeholder="" required="required" />
					<font color="red">请填写物品实际价值，单位：元</font>
	       	</div>
	       <div class="weui_dialog_bd weui_dialog_confirm_bd">
		       <article class="weui_article" style="padding: 0px 15px 0px 0px;">
		            <section style="font-size: 0.7em;height: 120px;overflow: auto;">
		                <h2>温馨提示</h2>
		                <p>1、如果您所在公司、社区已开通企业快递服务，你可请求加入该公司或组织；</p>
						<p>2、如果公司、社区向您发送了邀请码，可凭邀请码加入组织；</p>
						<p>3、加入组织后，公司前台/小区物业可代收、发快递；</p>
						<p>4、发快递可享受企业团体优惠价；</p>
						<p>5、快递费由公司代收，再由公司统一与快递公司结算。</p>
		            </section>
		       </article>
	       </div>
	       <div class="weui_dialog_ft" style="z-index: 999">
	       	   <a href="javascript:hide('.ensurePrice')" class="weui_btn_dialog default weui_btn_confirm_dialog_cancel">关闭</a>
	           <a href="javascript:setEnsurePrice();" class="weui_btn_dialog primary weui_btn_confirm_dialog_ok">确定</a>
	       </div>
	      
	   </div>
</div>
<!-- 弹出保价Div -->

<!-- 弹出填写自定义物品Div -->
<div class="weui_dialog_confirm wpselfDiv" style="display: none;">
	   <div class="weui_mask"></div>
	   <div class="weui_dialog">
	       <div class="weui_dialog_hd">
	       	<input class="weui_input" type="text" id="wpTypeInput"  style="height: 42px;
	       			border: 1px solid #04BE02;border-radius:5px;" maxlength="10"
					placeholder="请填写物品类型" required="required" />
	       	</div>
	       <div class="weui_dialog_ft" style="z-index: 999">
	       	   <a onclick="hide('.wpselfDiv');" class="weui_btn_dialog default weui_btn_confirm_dialog_cancel">关闭</a>
	           <a onclick="setOther();" class="weui_btn_dialog primary weui_btn_confirm_dialog_ok">确定</a>
	       </div>
	      
	   </div>
</div>
<!-- 弹出填写自定义物品Div -->

<!-- 弹出填写物品重量Div -->
<div class="weui_dialog_confirm wgselfDiv" style="display: none;">
	   <div class="weui_mask"></div>
	   <div class="weui_dialog">
	       <div class="weui_dialog_hd">
	       	<input class="weui_input" type="text" id="wgInput" style="height: 42px;
		       		border: 1px solid #04BE02;border-radius:5px;" maxlength="8"
					placeholder="" required="required" />
					<font color="red" >请填写物品重量 单位：千克(kg)</font>
	       	</div>
	       <div class="weui_dialog_ft" style="z-index: 999">
	       	   <a onclick="hide('.wgselfDiv');" class="weui_btn_dialog default weui_btn_confirm_dialog_cancel">关闭</a>
	           <a onclick="setWg();" class="weui_btn_dialog primary weui_btn_confirm_dialog_ok">确定</a>
	       </div>
	      
	   </div>
</div>
<!-- 弹出填写物品重量Div -->

<!-- 引入微信样式代码提示工具开始 -->
<%@ include file="/pages/wx/wxClass.jsp"%>
<%@ include file="/pages/wx/baseBottom.jsp"%>
</body>
</html>

